-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue #87 create cleanup script for all s3 buckets #109
base: development
Are you sure you want to change the base?
Issue #87 create cleanup script for all s3 buckets #109
Conversation
1jc created script to list s3 bucket listing
1jc created script to delete a s3 bucket listing for clean up
TESTING:
|
IMPLEMENTATION
|
<style>
</style>
|
TESTING DONE: AWS CLI run s3BucketList.py and s3BucketDelete.py Microsoft Windows [Version 10.0.19044.1526] C:\Users\jcdam>aws --version C:\Users\jcdam>aws configure C:\Users\jcdam>python -m pip install boto3 C:\Users\jcdam\ad440-winter2022-thursday-repo\devops>git branch -r C:\Users\jcdam\ad440-winter2022-thursday-repo\devops>git checkout issue_#87_create_cleanup_script_for_all_s3_buckets C:\Users\jcdam\ad440-winter2022-thursday-repo\devops>git ls-files C:\Users\jcdam\ad440-winter2022-thursday-repo\devops>s3BucketList.py C:\Users\jcdam\ad440-winter2022-thursday-repo\devops>s3BucketDelete.py C:\Users\jcdam\ad440-winter2022-thursday-repo\devops> |
1jc made changes to line 16 per request BT
1jc made changes to line 16 per request BT
When I try to run S3BucketDelete.py I get this error:
The other script works. |
Okay just saw you pushed some changes and it is working for me now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add these scripts to their own subfolder (DeleteS3Bucket) under 'devops'. I suggest the naming convention 'deleteS3Bucket.py' to be consistent with the other folders/scripts.
@nceres Please add these scripts to their own subfolder (DeleteS3Bucket) under 'devops'. I suggest the naming convention 'deleteS3Bucket.py' to be consistent with the other folders/scripts. I tried doing what you suggested when I first started the issue the folder system would not let me for some reason - so I put these into my own branch @nceres Please add these scripts to their own subfolder (DeleteS3Bucket) under 'devops'. I suggest the naming convention 'deleteS3Bucket.py' to be consistent with the other folders/scripts. |
1jc nceres reviewed and run the two scripts stating that it works. Cannot change the subfolder criteria because system would not let me. I made the necessary corrections for the s3BucketDelete.py on line 16 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made name changes per @nceres request please see the following: #listing of files on git C:\Users\jcdam\ad440-winter2022-thursday-repo\devops>git ls-files #changing the names if two files C:\Users\jcdam\ad440-winter2022-thursday-repo\devops>git mv s3BucketDelete.py DeleteS3Bucket.py #results from changing names in files C:\Users\jcdam\ad440-winter2022-thursday-repo\devops>git ls-files #getting status of name changes C:\Users\jcdam\ad440-winter2022-thursday-repo\devops>git status Changes to be committed: C:\Users\jcdam\ad440-winter2022-thursday-repo\devops>git commit -m "Renamed two files by 1jc " #committed changes |
1jc made requested changes of renaming files. See above comment of changes made in git. And made requested change on line 16 error on DeleteS3Bucket.py script |
What happens when you create a folder under devops in your editor (is it Visual Studio Code?) and try to add the files there? Is there an error message or something you can share? |
1jc Issue 116 Fix script to delete all s3 buckets even with data python file DeletingAllS3BucketsIssue116.py
1jc for Issue 116 Sprint 4 " Issue 116 Fix script to delete all s3 buckets even with data"
1jc corrected sprint 3 mistake on milestone |
1jc made minor correction to list buckets then delete buckets to update file "DeleteAllS33BucketIssue116.py"
…ipt_to_delete_all_s3_buckets_even_with_data DeletingAllS3BucketsIssue116.py
1jc moved to Done 03222022 Changed to Sprint 3 |
#87
The script should list the buckets and delete them after confirmation. per instructor
The goal is to make a script listing the S3 buckets and then deleting them after confirmation. Testing will made to make sure script works. 1jc
DATA ISSUE
The need script to list the s3 buckets and delete such buckets.
SCOPE
write python script for s3 bucket listing.
write python script for s3 bucket deleting.
Major Obstacles:
Instructor tested PR Thursday March 3, 2022. s3BucketList.py worked fine. s3BucketDelete.py worked but he wanted me to fix the script it where it should be automated versus original script deleting each bucket one by one making sure the bucket is empty.
Resolved Obstacle:
#116
This is a bug in the #87
The script doesn't delete all S3 buckets but only one
The script requires manual input and cannot be run from an automation machine. This should be changed to command line parameters
You can use #85 as example how to write automation
Instructor issued another issue which is issue #116 Fix the script to delete all s3 buckets even with data in connection there is a bug in issue 87 .
Project report for Instructor
Project Duration Sprint 3: started February 17, 2022, ending February 28, 2022
Coordination: DevOps Team issue assigned to 1jc
Report Date: February 28, 2022
Assumptions: N/A